<?php

class MyWebModule extends CWebModule
{
    var $title;
    // {{{ init
    public function init()
    {
        // this method is called when the module is being created
        // you may place code here to customize the module or the application

        parent::init();
        
        /*
        $app = Yii::app();
        //$this->_initIcons();
        if (isset($_POST['_lang']))
        {
        $app->language = $_POST['_lang'];
        $app->session['_lang'] = $app->language;
        }
        else if (isset($app->session['_lang']))
        {
        $app->language = $app->session['_lang'];
        }
        else
        {
        $app->language = Yii::app()->params['default_locale'];
        $app->session['_lang'] = $app->language;
        }

        // Init php-gettext
        $supported_locales = $app->params['supported_locales'];
        $encoding = 'UTF-8';
        if (strtoupper(substr(php_uname('s'), 0, 3)) === 'WIN') { 
        // putenv("LC_ALL=".$app->session['_lang']); 
        // putenv("LANG=".$app->session['_lang']); 
        $aLang = explode('_', $app->session['_lang']);
        putenv("LANGUAGE=".$aLang[0]); 
        // windows workaround for LC_MESSAGES 
        if (!defined('LC_MESSAGES')) define('LC_MESSAGES', 6);
        }
        // Set the text domain as 'messages'
        $domain = 'messages';
        define('LOCALE_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'messages'.DIRECTORY_SEPARATOR);
        //dbg('LOCALE_DIR: '.LOCALE_DIR);
        setlocale(LC_MESSAGES, $app->language);
        bindtextdomain($domain, LOCALE_DIR);
        bind_textdomain_codeset($domain,$encoding);
        textdomain($domain);
        define('DEC_PT',    _('DecimalPoint'));
        define('TH_SEP',    _('ThousandsSeparator'));
         */
    } // }}} 
 

}
